﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Data;

namespace ESC.Designer.Resources
{
    class PartInStockStatusColorConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            //0为正常，1为有部分移库任务,2为全部移库
            if (value.ToString() == "1")
            {
                return "#FFAA3F3F";
            }
            else if (value.ToString() == "2")
            {
                return "Red";
            }
            else if (value.ToString() == "3")
            {
                return "Green";
            }
            else
            {
                return "Black";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
                
    }
}
